<?php if($this->errMsg) :?>
	<?php $this->showError($this->errMsg)?>
<?php endif; ?>
<?php if($this->msg) :?>		
	<?php $this->showMessage($this->msg)?>	
<?php endif;?>
<form name='form' id='form' action="" method="POST">
	<div class="title_ad"><label><a href="">Edit</a></label>
	</div>
	<div class="mydiv">
	<table  class="tb_box">
		<tr>
			<td>
				<label>ID User :</label>
			</td>
			<td>
				<input readonly="readonly" type="text" name ="id" value = "<?php echo $this->thisuser->id;?>">
			</td>
			<td>
				<label>User Name</label>
			</td>
			<td>
				<input readonly="readonly" type="text" name ="userName" value = "<?php echo $this->thisuser->userName?>">
			</td>
		</tr>
		<tr>
			<td>
				<label>Name</label>
			</td>
			<td>	
				<input readonly="readonly" type="text" name ="name" value = "<?php echo $this->thisuser->name?>">
			</td>
			<td>
				<label>status</label>
			</td>
			<td>
				<?php
				if($this->thisuser->id != 1)
				{
					$active = ""; $nonactive="";
					if($this->thisuser->active == 1)
						$active = "selected";
					else
						$nonactive = "selected";
					echo("<select name='active'><option value='1' ".$active.">Active</option><option value='0' ".$nonactive.">Banned</option></select>");
				}
				?>
			</td>
		</tr>
		<tr>
			<td>
				<label>Group</label>
			</td>			
			<td>
			<?php 
				if($this->thisuser->id != 1)
				{
			?>					
				<select name="group_id">
				
				<option value="">Chọn nhóm quyền</option>
				
				<?php
					foreach($this->group as $row)
					{
						if($row->id != 1)
						{
							$strGroup="";
							if($this->thisuser->group_id==$row->id)
							{
								$strGroup='selected';
							}
							else
							{
								$strGroup="";
							}
							?>
							<option <?php echo $strGroup;?> value="<?php echo $row->id;?>"><?php echo  $row->name;?></option>
							<?php 
						}
					}
				}
				else
					echo "Admintrator";		
				?>
				</select>				
			</td>	
			<td>
				<label>phone</label>
			</td>
			<td>
				<input type="text" name ="phone" value = "<?php echo $this->thisuser->phone?>" >
			</td>
		</tr>
		<tr>
			<td>
				<label>Email</label>
			</td>
			<td colspan="3">
				<input type="text" name="email" value = "<?php echo $this->thisuser->email?>" style="width: 300px;">
			</td>
		</tr>	
	</table>
	<?php if($this->thisuser->id != 1)
		echo('
	<div class="div_button" >	
		<input type="submit" value="Lưu" class="button"/>
		<input type="reset" value="Làm lại" class="button" />
	</div>');
	?>
	</div> 
</form>